﻿<SettingsFlyout
    x:Class="InTheHand.UI.ApplicationSettings.AboutFlyout"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:InTheHand.UI.ApplicationSettings.About.RT"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:converters="using:InTheHand.UI.Converters"
    mc:Ignorable="d"
    Title="About"
    IconSource="{Binding Logo}"
    d:DesignWidth="346">

    <SettingsFlyout.Resources>
        <converters:PackageVersionConverter x:Key="PackageVersionConverter"/>
        <converters:StringCaseConverter x:Key="StringCaseConverter"/>
    </SettingsFlyout.Resources>
    <!-- This StackPanel acts as a root panel for vertical layout of the content sections -->
    <StackPanel MinWidth="260" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >

            <TextBlock Text="{Binding DisplayName}" Style="{ThemeResource SubheaderTextBlockStyle}" />

            <StackPanel Orientation="Horizontal" Margin="0,10">
                <TextBlock Text="By"  Style="{ThemeResource SubtitleTextBlockStyle}"/>
                <TextBlock Margin="6,0,0,0" Text="{Binding PublisherDisplayName}" Style="{ThemeResource SubtitleTextBlockStyle}"/>
            </StackPanel>

            <StackPanel Orientation="Horizontal">
            <TextBlock Text="Version" Foreground="{ThemeResource ApplicationSecondaryForegroundThemeBrush}"  Style="{ThemeResource SubtitleTextBlockStyle}"/>
            <TextBlock Margin="6,0,0,0" Text="{Binding Id.Version, Converter={StaticResource PackageVersionConverter}}" Foreground="{ThemeResource ApplicationSecondaryForegroundThemeBrush}"  Style="{ThemeResource SubtitleTextBlockStyle}"/>
            </StackPanel>

        <TextBlock Margin="0,10,0,20" Text="{Binding Description}" TextWrapping="Wrap"  Style="{ThemeResource BodyTextBlockStyle}"/>
            <HyperlinkButton x:Name="PublisherHyperlink" Margin="-14,14,14,14" Content="More from"  FontSize="{StaticResource ControlContentThemeFontSize}"  Click="PublisherButton_Click"/>
        
            <Button x:Name="PrimaryButton" Visibility="Collapsed" Click="PrimaryButton_Click" Content="owned" Margin="0,100,0,0" IsEnabled="False"/>
        </StackPanel>
</SettingsFlyout>
